

package Presentacion;


public class Principal extends javax.swing.JFrame {

    
    public Principal() {
        initComponents();
        setLocationRelativeTo(null);
        setResizable(false);
        setTitle("Sistema de PostVenta Motores S.A.");
    }

    
    @SuppressWarnings("unchecked")
      // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
      private void initComponents() {

            escritorio = new javax.swing.JDesktopPane();
            jMenuBar1 = new javax.swing.JMenuBar();
            btn_archivo = new javax.swing.JMenu();
            btn_iniciar = new javax.swing.JMenuItem();
            btn_personas = new javax.swing.JMenu();
            btn_clientes = new javax.swing.JMenuItem();
            btn_empleados = new javax.swing.JMenuItem();
            btn_turnos = new javax.swing.JMenu();
            btn_pedidos = new javax.swing.JMenu();
            btn_control = new javax.swing.JMenu();
            btn_salir = new javax.swing.JMenu();

            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

            javax.swing.GroupLayout escritorioLayout = new javax.swing.GroupLayout(escritorio);
            escritorio.setLayout(escritorioLayout);
            escritorioLayout.setHorizontalGroup(
                  escritorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                  .addGap(0, 884, Short.MAX_VALUE)
            );
            escritorioLayout.setVerticalGroup(
                  escritorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                  .addGap(0, 631, Short.MAX_VALUE)
            );

            jMenuBar1.setBackground(new java.awt.Color(153, 153, 255));
            jMenuBar1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
            jMenuBar1.setForeground(new java.awt.Color(0, 51, 51));

            btn_archivo.setText("Archivo");

            btn_iniciar.setText("Iniciar Sesión");
            btn_iniciar.addActionListener(new java.awt.event.ActionListener() {
                  public void actionPerformed(java.awt.event.ActionEvent evt) {
                        btn_iniciarActionPerformed(evt);
                  }
            });
            btn_archivo.add(btn_iniciar);

            jMenuBar1.add(btn_archivo);

            btn_personas.setText("Personas");
            btn_personas.addActionListener(new java.awt.event.ActionListener() {
                  public void actionPerformed(java.awt.event.ActionEvent evt) {
                        btn_personasActionPerformed(evt);
                  }
            });

            btn_clientes.setText("Clientes");
            btn_clientes.addActionListener(new java.awt.event.ActionListener() {
                  public void actionPerformed(java.awt.event.ActionEvent evt) {
                        btn_clientesActionPerformed(evt);
                  }
            });
            btn_personas.add(btn_clientes);

            btn_empleados.setText("Empleados");
            btn_empleados.addActionListener(new java.awt.event.ActionListener() {
                  public void actionPerformed(java.awt.event.ActionEvent evt) {
                        btn_empleadosActionPerformed(evt);
                  }
            });
            btn_personas.add(btn_empleados);

            jMenuBar1.add(btn_personas);

            btn_turnos.setText("Turnos");
            jMenuBar1.add(btn_turnos);

            btn_pedidos.setText("Pedidos");
            jMenuBar1.add(btn_pedidos);

            btn_control.setText("Control");
            jMenuBar1.add(btn_control);

            btn_salir.setText("Salir");
            btn_salir.addActionListener(new java.awt.event.ActionListener() {
                  public void actionPerformed(java.awt.event.ActionEvent evt) {
                        btn_salirActionPerformed(evt);
                  }
            });
            jMenuBar1.add(btn_salir);

            setJMenuBar(jMenuBar1);

            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                  .addComponent(escritorio, javax.swing.GroupLayout.Alignment.TRAILING)
            );
            layout.setVerticalGroup(
                  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                  .addComponent(escritorio, javax.swing.GroupLayout.Alignment.TRAILING)
            );

            pack();
      }// </editor-fold>//GEN-END:initComponents

    private void btn_iniciarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_iniciarActionPerformed
       IniciarSesion Sesion = new IniciarSesion();
       escritorio.add(Sesion);
       Sesion.setVisible(true);
    }//GEN-LAST:event_btn_iniciarActionPerformed

    private void btn_clientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clientesActionPerformed
        Cliente unCliente= new Cliente();
        escritorio.add(unCliente);
        unCliente.setVisible(true);
    }//GEN-LAST:event_btn_clientesActionPerformed

    private void btn_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_salirActionPerformed
        this.dispose();
    }//GEN-LAST:event_btn_salirActionPerformed

      private void btn_personasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_personasActionPerformed
            // TODO add your handling code here:
      }//GEN-LAST:event_btn_personasActionPerformed

      private void btn_empleadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_empleadosActionPerformed
            Empleado unEmpleado= new Empleado();
            escritorio.add(unEmpleado);
            unEmpleado.setVisible(true);
      }//GEN-LAST:event_btn_empleadosActionPerformed



      // Variables declaration - do not modify//GEN-BEGIN:variables
      private javax.swing.JMenu btn_archivo;
      private javax.swing.JMenuItem btn_clientes;
      private javax.swing.JMenu btn_control;
      private javax.swing.JMenuItem btn_empleados;
      private javax.swing.JMenuItem btn_iniciar;
      private javax.swing.JMenu btn_pedidos;
      private javax.swing.JMenu btn_personas;
      private javax.swing.JMenu btn_salir;
      private javax.swing.JMenu btn_turnos;
      private javax.swing.JDesktopPane escritorio;
      private javax.swing.JMenuBar jMenuBar1;
      // End of variables declaration//GEN-END:variables
}
